Write header block of zero waypoints even when we have zero waypoints.
authorrobertl <robertl>
Tue, 3 Jul 2007 22:07:09 +0000 (22:07 +0000)
committerrobertl <robertl>
Tue, 3 Jul 2007 22:07:09 +0000 (22:07 +0000)
lowranceusr.c

index 3d867d22cca63f749ba942c89046e75f18e87224..0664cdd56de22046a56bc61526194eb2152ecca8 100644 (file)
@@ -956,19 +956,17 @@ data_write(void)
     if (global_opts.debug_level >= 1)
        printf("LOWRANCE data_write: Num waypoints = %d\n", NumWaypoints);
 
-       if (NumWaypoints) {
-               if  (writeasicons) {
-                       short zero = 0;
-                       my_fwrite2(&zero, file_out);
-               } else {
-                       my_fwrite2(&NumWaypoints, file_out);
-                       waypt_disp_all(lowranceusr_waypt_pr);
-               }
-       }
-
-       /* Route support added 6/21/05 */
-       NumRoutes = route_count();
-       my_fwrite2(&NumRoutes, file_out);
+    if (writeasicons) {
+           short zero = 0;
+           my_fwrite2(&zero, file_out);
+    } else {
+           my_fwrite2(&NumWaypoints, file_out);
+           waypt_disp_all(lowranceusr_waypt_pr);
+    }
+
+    /* Route support added 6/21/05 */
+    NumRoutes = route_count();
+    my_fwrite2(&NumRoutes, file_out);
 
     if (global_opts.debug_level >= 1)
        printf("LOWRANCE data_write: Num routes = %d\n", NumRoutes);